import request from '../config/request.js';
import host from '../config/host';

const getWorkLogById = function(id, callback) {
  request.getData(host.pcHostUrl + `/wx/workLog/getById/${id}`, callback);
};
const getWorkLog = function(params, callback) {
  request.postData(host.pcHostUrl + '/wx/workLog/query', params, callback);
};
const postWorkLog = function(params, callback) {
  request.postData(host.pcHostUrl + '/wx/workLog/save', params, callback);
};
const putWorkLog = function(params, callback) {
  request.postData(host.pcHostUrl + '/wx/workLog/update', params, callback);
};
const putWorkLogState = function(params, callback) {
  request.postData(host.pcHostUrl + '/wx/workLog/updateState', params, callback);
};

export default {
  getWorkLogById,
  getWorkLog,
  postWorkLog,
  putWorkLog,
  putWorkLogState,
};
